package com.zkthink.ceres.store.entity;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zkthink.base.entity.Entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;
import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 *
 * </p>
 *
 * @author chenke
 * @since 2022-04-22
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("ceres_store_join")
@ApiModel(value = "StoreJoin", description = "申请店铺表")
@AllArgsConstructor
public class StoreJoin extends Entity<Long> {

    private static final long serialVersionUID = 1L;

    /**
     * 会员ID
     */
    @ApiModelProperty(value = "会员ID")
    @TableField("mid")
    @Excel(name = "会员ID")
    private Long mid;

    /**
     * 店铺名称
     */
    @NotBlank(message = "店铺名称必填")
    @ApiModelProperty(value = "店铺名称")
    @Length(max = 200, message = "店铺名称长度不能超过200")
    @TableField(value = "store_name", condition = LIKE)
    @Excel(name = "店铺名称")
    private String storeName;

    /**
     * 1汽修店，2保养店，3美容店，4贴膜店，5洗车店，6轮胎更换店，7救援店，8加油站
     */
    @ApiModelProperty(value = "1汽修店，2保养店，3美容店，4贴膜店，5洗车店，6轮胎更换店，7救援店，8加油站")
    @TableField("store_type")
    @Excel(name = "1汽修店，2保养店，3美容店，4贴膜店，5洗车店，6轮胎更换店，7救援店，8加油站")
    private Integer storeType;

    /**
     * 店铺简介
     */
    @ApiModelProperty(value = "店铺简介")
    @Length(max = 500, message = "店铺简介长度不能超过500")
    @TableField(value = "remark", condition = LIKE)
    @Excel(name = "店铺简介")
    private String remark;

    /**
     * 经度
     */
    @NotBlank(message = "请选择店铺位置")
    @ApiModelProperty(value = "经度")
    @Length(max = 255, message = "经度长度不能超过255")
    @TableField(value = "longitude", condition = LIKE)
    @Excel(name = "经度")
    private String longitude;

    /**
     * 纬度
     */
    @NotBlank(message = "请选择店铺位置")
    @ApiModelProperty(value = "纬度")
    @Length(max = 255, message = "纬度长度不能超过255")
    @TableField(value = "latitude", condition = LIKE)
    @Excel(name = "纬度")
    private String latitude;

    @ApiModelProperty(value = "")
    @Length(max = 255, message = "长度不能超过255")
    @TableField(value = "register_province", condition = LIKE)
    @Excel(name = "")
    private String registerProvince;
    @ApiModelProperty(value = "")
    @Length(max = 255, message = "长度不能超过255")
    @TableField(value = "register_city", condition = LIKE)
    @Excel(name = "")
    private String registerCity;
    @ApiModelProperty(value = "")
    @Length(max = 255, message = "长度不能超过255")
    @TableField(value = "register_area", condition = LIKE)
    @Excel(name = "")
    private String registerArea;
    @ApiModelProperty(value = "")
    @Length(max = 255, message = "长度不能超过255")
    @TableField(value = "province_code", condition = LIKE)
    @Excel(name = "")
    private String provinceCode;
    @ApiModelProperty(value = "")
    @Length(max = 255, message = "长度不能超过255")
    @TableField(value = "city_code", condition = LIKE)
    @Excel(name = "")
    private String cityCode;
    @ApiModelProperty(value = "")
    @Length(max = 255, message = "长度不能超过255")
    @TableField(value = "area_code", condition = LIKE)
    @Excel(name = "")
    private String areaCode;

    /**
     * 地址详情
     */
    @NotBlank(message = "地址详情必填")
    @ApiModelProperty(value = "地址详情")
    @Length(max = 255, message = "地址详情长度不能超过255")
    @TableField(value = "address", condition = LIKE)
    @Excel(name = "地址详情")
    private String address;

    /**
     * 0=审核中 1=申请通过 2=申请失败
     */
    @ApiModelProperty(value = "0=审核中 1=申请通过 2=申请失败")
    @TableField("apply_type")
    @Excel(name = "0=审核中 1=申请通过 2=申请失败")
    private Integer applyType;

    /**
     * 审核人
     */
    @ApiModelProperty(value = "审核人")
    @TableField("apply_user")
    @Excel(name = "审核人")
    private Long applyUser;

    /**
     * 审核失败原因
     */
    @ApiModelProperty(value = "审核失败原因")
    @Length(max = 255, message = "审核失败原因长度不能超过255")
    @TableField(value = "reason", condition = LIKE)
    @Excel(name = "审核失败原因")
    private String reason;

    /**
     * 联系电话
     */
    @NotBlank(message = "联系电话必填")
    @ApiModelProperty(value = "联系电话")
    @TableField(value = "telephone", condition = LIKE)
    @Excel(name = "联系电话")
    private String telephone;

    /**
     * 联系人姓名
     */
    @ApiModelProperty(value = "联系人姓名")
    @Length(max = 255, message = "联系人姓名长度不能超过255")
    @TableField(value = "contacts", condition = LIKE)
    @Excel(name = "联系人姓名")
    private String contacts;

    /**
     * 身份证号
     */
    @ApiModelProperty(value = "身份证号")
    @Length(max = 30, message = "身份证号长度不能超过30")
    @TableField(value = "id_num", condition = LIKE)
    @Excel(name = "身份证号")
    private String idNum;

    /**
     * 身份证反面照片
     */
    @ApiModelProperty(value = "身份证照片( ,拼接正反面)")
    @Length(max = 255, message = "身份证反面照片长度不能超过255")
    @TableField(value = "id_imgs", condition = LIKE)
    @Excel(name = "身份证照片( ,拼接正反面)")
    private String idImgs;

    /**
     * 门店照片介绍(多张直接用,拼接)
     */
    @ApiModelProperty(value = "门店照片介绍(多张直接用,拼接)")
    @Length(max = 255, message = "门店照片介绍长度不能超过255")
    @TableField(value = "storeintro_img", condition = LIKE)
    @Excel(name = "门店照片介绍(多张直接用,拼接)")
    private String storeintroImg;

    /**
     * 营业时间
     */
    @NotBlank(message = "营业时间必填")
    @ApiModelProperty(value = "营业时间")
    @TableField(value = "business_hours", condition = LIKE)
    @Excel(name = "营业时间")
    private String businessHours;

    /**
     * 店面照
     */
    @NotBlank(message = "店铺照片必填")
    @ApiModelProperty(value = "店面照")
    @TableField(value = "storefront_img", condition = LIKE)
    @Excel(name = "店面照")
    private String storefrontImg;

    /**
     * 店面背景图
     */
    @NotBlank(message = "店铺背景图必填")
    @ApiModelProperty(value = "背景图")
    @TableField(value = "background_img", condition = LIKE)
    @Excel(name = "背景图")
    private String backgroundImg;
    @ApiModelProperty(value = "1=删除")
    @TableField(value = "is_delete")
    private Integer isDelete;
    @Builder
    public StoreJoin(Long id, LocalDateTime updateTime, Long createUser, LocalDateTime createTime, Long updateUser,
                     Long mid, String storeName, Integer storeType, String remark, String longitude,
                     String latitude, String registerProvince, String registerCity, String registerArea, String provinceCode, String cityCode,
                     String areaCode, String address, Integer applyType, Long applyUser, String reason) {
        this.id = id;
        this.updateTime = updateTime;
        this.createUser = createUser;
        this.createTime = createTime;
        this.updateUser = updateUser;
        this.mid = mid;
        this.storeName = storeName;
        this.storeType = storeType;
        this.remark = remark;
        this.longitude = longitude;
        this.latitude = latitude;
        this.registerProvince = registerProvince;
        this.registerCity = registerCity;
        this.registerArea = registerArea;
        this.provinceCode = provinceCode;
        this.cityCode = cityCode;
        this.areaCode = areaCode;
        this.address = address;
        this.applyType = applyType;
        this.applyUser = applyUser;
        this.reason = reason;
    }

}
